local Class = require('lua.lang.Class')
local CompileState = require('lua.vm.compiler.CompileState')
local Compiler = require('lua.vm.Compiler')

--- @class LuaCompiler : Compiler
local LuaCompiler = Class {
	__extends = Compiler
}

--- @param stream InputStream
--- @param chunkName string
--- @return Prototype
function LuaCompiler:compile(stream, chunkName)
	return CompileState:new():luaYParseChunk(stream, chunkName)
end

return LuaCompiler